#ifndef sprite_game_bomb_h
#define sprite_game_bomb_h

#import "head.h"

@class sprite_game_heart;

/*sprite_game_bomb
*/
@interface SpriteGameBomb : CCSprite
{
	int type_;

	int attackPoint_;
	bool canBeDestroy_;

	b2Body *box2dBody_;
	b2Fixture *box2dFixture_;

	CCSprite *image_;
	CCSprite *imageLaserHead_;
	CCParticleSystem *particle_;

	int state_;
	bool flagTimeStopValid_;
	int flagBombType6State_;
	float bombType6BigTime_;
	float bombType6SmallTime_;
	float bombType6LineWidth_;
	float bombType6LineBigSegment_;
	float bombType6LineSmallSegment_;
	CGPoint bombType6EndPoition_;
}

@property (nonatomic, readwrite) int type;
@property (nonatomic, readwrite) int attackPoint;
@property (nonatomic, readwrite) bool canBeDestroy;
@property (nonatomic, readwrite) bool flagTimeStopValid;

- (id)initSpriteGameBomb:(int)Type;
- (void)tick:(ccTime)Time;
- (void)tickBombType6BigOver:(ccTime)Time;
- (void)tickBombType6SmallOver:(ccTime)Time;
- (void)tickBombType6Over:(ccTime)Time;

/*box2d control
*/
- (void)CreateBody;
- (void)DestroyBody;
- (b2Vec2)ComputeBodyPosition;

/*game state control
*/
- (void)Pause;
- (void)Resume;

/*when check collision, return if is heart fixture
*/
- (bool)IsMyFixture:(b2Fixture *)Fixture;

/*item function
*/
- (void)ItemFunctionTimeStop;
- (void)ItemFunctionTimeStopOver;

/*action
*/
- (void)ActionAttack:(float)Time And:(CGPoint)EndPos;
- (void)ActionDestroy;
- (void)ActionExplosion;
- (void)StopAction;

/*play animation
*/
- (void)PlayAniFly;

/*call back
*/
- (void)CallBackActionMoveOver:(id)Sender;
- (void)CallBackActionDestroyOver:(id)Sender;
- (void)CallBackAniExplosionOver:(id)Sender;
- (void)CallBackBombType6LineWidthBigOver:(id)Sender;
- (void)CallBackBombType6LineWidthSmallOver:(id)Sender;

@end

/*sprite_game_swirl
*/
@interface SpriteGameSwirl : CCSprite
{
	int type_;

	CCSprite *image_;
	std::list<sprite_game_heart *> heartList_;
}

- (id)initSpriteGameSwirl:(int)Type;

- (void)tickLifeCycle:(ccTime)Time;
- (void)tickCheckHeartOver:(ccTime)Time;
- (void)tickDestroyBridge:(ccTime)Time;

/*game state control
*/
- (void)Pause;
- (void)Resume;

- (void)DetachmentHeart:(sprite_game_heart *)Heart;

- (void)PlayAni;

- (void)ActionAppear;
- (void)ActionDisappear;

- (void)CallBackActionAppearOver:(id)Sender;
- (void)CallBackActionDisappearOver:(id)Sender;

@end

#endif